home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / Open Transport 1.3 / Open Transport SDK / Open Tpt Module Developer / Samples / EchoModule.exp < prev    next >
Encoding:
Text File  |  1998-04-30  |  1.8 KB  |  67 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        EchoModule.exp
  3.  
  4.     Contains:    The export declarations for the module
  5.  
  6.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #include <OpenTptModule.h>
  11.  
  12. #define kMyModuleName    "SmplEcho"
  13. #define kMyVersion        "1.0"
  14.  
  15. /*
  16.  * Just use this verbatim - substituting the name of your module
  17.  * for "SmplEcho".
  18.  */
  19. Library
  20. {
  21.     /*
  22.      * Typically we load modules this way so there are no surprises.
  23.      * This insures that the module, and all other shared libraries
  24.      * that it depends on, are in memory when we load
  25.      */
  26.     flags = noSegUnload, forceDeps, !mc68000, !emulated;
  27.     /*
  28.      * Create the name of the library.  We use this format,
  29.      * but you can use anything that you want
  30.      */
  31.     id = kOTLibraryPrefix kMyModuleName "," kMyVersion;
  32.     /* 
  33.      * Set up the version number of the library
  34.      */
  35.     version = kMyVersion;
  36.     /*
  37.      * Always use memory = local.  You don't want to be creating
  38.      * any memory in the client's pool, since you may stay around
  39.      * long after your client is gone.
  40.      */
  41.     memory = local;
  42. };
  43.  
  44. FunctionSet Module_echo
  45. {
  46.     /*
  47.      * The ID for your module MUST look like the following:
  48.      */
  49.     id            = kOTModulePrefix kMyModuleName "," kMyVersion;
  50.     /*
  51.      * The function set for your module can export many functions.
  52.      * However, you must export OTGetInstallInfo by name.
  53.      * If you want an initialization function, it must also be
  54.      * exported by the name InitStreamModule, and will be called the
  55.      * first time your module is loaded.
  56.      *
  57.      * If you also need a termination function, export a function
  58.      * called TerminateStreamModule, and it will be called before
  59.      * Open Transport unloads your module.
  60.      *
  61.      * NOTE: Don't make these "static" functions in your file, or
  62.      *       ASLM can't export them.
  63.      */
  64.     exports =     extern GetOTInstallInfo,
  65.                 extern InitStreamModule;
  66. };
  67.